public class O15 {
    public int hammingWeight(int n) {
        int re = 0;
        for (int i = 0; i < 32; i++) {
            re+=(n&1);
            n>>=1;
        }
        return re;
    }
}
